

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加</title>
    {include file="include/top"}
    <style>
        .layui-form-item .layui-input-inline{width: 80%;}
        #LAY_layedit_2{background: #fff;}
    </style>
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-app-form-tags" style="padding: 20px 0 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">系统</label>
        <div class="layui-input-inline">
            <select name="os" lay-search="" lay-filter="os" lay-search>
                <option value="">请选择系统</option>
                <option value="android" <?php if(isset($data['os']) && $data['os']=='android'){ echo 'selected';}?>>android系统</option>
                <option value="ios" <?php if(isset($data['os']) && $data['os']=='ios'){ echo 'selected';}?>>ios系统</option>
            </select>
        </div>
    </div>
    <div id="qudao" style="display: none;margin-bottom: 16px;" >
        {include file="include/selectsearch" class2='layui-form-item' title="平台来源" classname='fromID' optionHtml='<?php echo isset($qudao)?$qudao:"";?>' }
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">强制更新</label>
        <div class="layui-input-inline">
            <select name="must" lay-search="" lay-filter="must" lay-search>
                <option value="">请选择是否强制更新</option>
                <option value="1" <?php if(isset($data['must']) && $data['must']==1){ echo 'selected';}?>>强制更新</option>
                <option value="0" <?php if(isset($data['must']) && $data['must']==0){ echo 'selected';}?>>不强制更新</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">版本号</label>
        <div class="layui-input-inline">
            <input type="text" name="num" value="{$data.num?$data.num:''}" lay-verify="required" placeholder="请输入版本号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">版本信息</label>
        <div class="layui-input-inline">
            <input type="text" name="version" value="{$data.version?$data.version:''}" lay-verify="required" placeholder="1.0.0" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">下载地址</label>
        <div class="layui-input-inline">
            <input type="text" name="url" value="{$data.url?$data.url:'https://html.rongyipai.cn/apk/rongyipai.apk'}" lay-verify="required" placeholder="请输入下载地址" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">更新说明</label>
        <div class="layui-input-inline">
            <textarea id="content" name="content" lay-verify="content" autocomplete="off" class="layui-textarea">{$data.content?$data.content:''}</textarea>
        </div>
    </div>

</div>

{include file="include/js"}
<script>
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form'],function () {
        var $=layui.$;
        var form=layui.form;

        form.on("select(os)",function (re){
            if(re.value=='android'){
                $("#qudao").show()
            }else{
                $("#qudao").hide()
            }
        })


    });
</script>
</body>
</html>